<?php

namespace App\Models;
//继承Auth验证的用户模型
use Illuminate\Foundation\Auth\User as AuthUser;
use Illuminate\Database\Eloquent\SoftDeletes;

class User extends AuthUser
{
    //软删除
    use SoftDeletes;
    protected $dates = ['deleted_at'];
    //设置黑名单
    protected $guarded =    [];
    //退出登录时的错误提示解决
    protected $rememberTokenName = null;
    //隐藏字段
    protected $hidden =['password'];

    //角色属于
    public function role(){
        return $this->belongsTo(Role::class,'role_id');
    }
}
